#!bin/bash
echo pwd
PROJECT_PATH=$(cd $(dirname $0); cd ../; pwd)
EXCLUDES="MIT,Apache-2.0,ISC,BSD-2-Clause,MPL-2.0,BSD-3-Clause OR GPL-2.0"
#MIT, MIT OR X11, BSD, ISC,ISC
echo "当前项目所在目录：" $PROJECT_PATH
LICENSES_FILE=$PROJECT_PATH/licenses.json
license-checker --start $PROJECT_PATH --json > $LICENSES_FILE --exclude $EXCLUDES --unknown
echo "许可证检查输出文件：" $LICENSES_FILE
